<?php
#为用户加砖块
ini_set('display_errors', 1);
error_reporting(-1);
ini_set('memory_limit', '512M');
require_once '/data/wwwroot/g_vendor/autoload.php';

use Biz\model\springHomeDecActivity\Wish as mWish;

if (!isset($argv[1]) || !isset($argv[2])) {
    echo "参数错误" . PHP_EOL;
    exit;
}

$uid = $argv[1] ?? 0;

$count = $argv[2] ?? 0;

if (!$uid || !$count) {
    echo "参数错误" . PHP_EOL;
    exit;
}

$data = [
    'brick_count' => $count,
];

$where['uid'] = $uid;

mWish::dataUpdate($data, $where);

var_dump(mWish::log());